package com.genshang.restaurant.controller;


import com.genshang.restaurant.result.ResultBody;
import com.genshang.restaurant.service.IBannerInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Alex
 * @since 2020-09-25
 */
@RestController
@RequestMapping("/bannerInfo")
public class BannerInfoController {

    @Autowired
    private IBannerInfoService bannerInfoService;

    /**
     * 5.获取轮播图
     * @return
     */
    @GetMapping("/getBannerList")
    public ResultBody getBannerList() {
        return ResultBody.success(bannerInfoService.getBannerInfoList());
    }
}
